package com.itwn.service.Impl;

import com.itwn.bean.Permissions;
import com.itwn.bean.User;
import com.itwn.bean.UserRoles;
import com.itwn.mapper.UserMapper;
import com.itwn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @ClassName: UserServiceImpl
 * @Author: 流光亦断
 * @Date: 2021/8/20 12:15
 * @Version: 1.0     // 版本
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User userLogin(String userNo) {
        return userMapper.userLogin(userNo);
    }

   @Override
    public List<String> getRoles(String userNo) {
        return userMapper.getRoles(userNo);
    }

    @Override
    public List<Permissions> getPermission() {
        return userMapper.getPermission();
    }

    @Override
    public int doRegister(User user) {
        return userMapper.doRegister(user);
    }

    @Override
    public int queryIdByNo(String userNo) {
        return userMapper.queryIdByNo(userNo);
    }

    @Override
    public int addUserRoles(UserRoles userRoles) {
        return userMapper.addUserRoles(userRoles);
    }
}
